|
In relational databases a virtual column is a table column whose value is automatically computed using other columns values, or another deterministic expression. Virtual columns are not part of any SQL standard, and are only implemented by some DBMS's, like MariaDB, SQL Server, Oracle and Firebird (database server) (COMPUTED BY syntax). == Implementation == There are two types of virtual columns: * Virtual columns; * Persistent columns. Virtual columns values are computed ''on the fly'' when needed, for example when they are returned by a SELECT statement. Persistent column values are computed when a row is inserted in a table, and they are written like all other values. They can change if other values change. Both virtual and persistent columns have advantages and disadvantages: virtual columns don't consume space on the disk, but they must be computed every time a query refers to them; persistent columns don't require any CPU time, but they consume disk space. However sometimes a choice is not available, because some DBMS's support only one column type (or neither of them). 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Virtual column」の詳細全文を読む スポンサード リンク
|